<?php
namespace app\index\model;

use think\Model;

class User extends Model
{
	//设置当前表默认日期时间显示格式
	protected $dateFormat = 'Y/m/d';
	
	// 开启自动写入时间戳
	protected $autoWriteTimestamp = true;	
	
	protected $updateTime = 'update_time';
	
	protected $type = [
			'hiredate'=>'timestamp'
	];
	
	public function getDepartAttr($value)
	{
		$degree = [
				1=>'市直+泰兴',
				2=>'兴化+高新',
				3=>'海陵+靖江',
				4=>'姜堰+高港'
		];
		//根据表中数据返回对应值
		return $degree[$value];
	}
	
	
}